using System;
using EPiServer.Common;
using EPiServer.Community.DocumentArchive;
using EPiServer.Community.DocumentArchive.Queries;

namespace EPiAbstractions.Community.DocumentArchive
{
    public interface IDocumentArchiveHandlerFacade
    {
        Content GetContent(Int32 id);

        EPiServer.Community.DocumentArchive.DocumentArchive GetDocumentArchive(Int32 id);

        EPiServer.Community.DocumentArchive.DocumentArchive AddDocumentArchive(EPiServer.Community.DocumentArchive.DocumentArchive archive);

        void UpdateDocumentArchive(EPiServer.Community.DocumentArchive.DocumentArchive archive);

        void RemoveDocumentArchive(EPiServer.Community.DocumentArchive.DocumentArchive archive);

        Document GetDocument(Int32 id);

        Document AddDocument(Document document);

        void UpdateDocument(Document document);

        void RemoveDocument(Document document);

        ContentCollection GetDocuments(EPiServer.Community.DocumentArchive.DocumentArchive archive, Int32 page, Int32 pageSize,
                                       ContentSortOrder[] sortOrder);

        ContentCollection GetDocuments(EPiServer.Community.DocumentArchive.DocumentArchive archive, Int32 page, Int32 pageSize,
                                       out Int32 totalItems, ContentSortOrder[] sortOrder);

        ContentCollection GetContents(EPiServer.Community.DocumentArchive.DocumentArchive archive, Int32 page, Int32 pageSize,
                                      ContentSortOrder[] sortOrder);

        ContentCollection GetContents(EPiServer.Community.DocumentArchive.DocumentArchive archive, Int32 page, Int32 pageSize,
                                      out Int32 totalItems, ContentSortOrder[] sortOrder);

        event EPiServerCommonEventHandler DocumentAdded;

        event EPiServerCommonEventHandler DocumentUpdated;

        event EPiServerCommonEventHandler DocumentRemoved;

        event EPiServerCommonEventHandler DocumentArchiveAdded;

        event EPiServerCommonEventHandler DocumentArchiveUpdated;

        event EPiServerCommonEventHandler DocumentArchiveRemoved;

        ContentCollection GetQueryResult(DocumentArchiveQuery query);

        ContentCollection GetQueryResult(DocumentArchiveQuery query, Int32 page, Int32 pageSize);

        ContentCollection GetQueryResult(DocumentArchiveQuery query, Int32 page, Int32 pageSize, out Int32 totalItems);

        ContentCollection GetQueryResult(DocumentQuery query);

        ContentCollection GetQueryResult(DocumentQuery query, Int32 page, Int32 pageSize);

        ContentCollection GetQueryResult(DocumentQuery query, Int32 page, Int32 pageSize, out Int32 totalItems);
    }
}